import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { FormObjectComponent } from './form-object/form-object.component';
import { FormArrayComponent } from './form-array/form-array.component';
import { NgxIdDirective } from './directive/ngx-id.directive';

const routes: Routes = [
  {path: '', component: HomeComponent},
  {path: '**', redirectTo: '/'},
];

@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    FormObjectComponent,
    FormArrayComponent,
    NgxIdDirective,
  ],
  imports: [
    BrowserModule,
    FormsModule,
    ReactiveFormsModule,
    RouterModule.forRoot(routes),
  ],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {
}
